import request from '@/utils/request'

const BASE_URL = '/admin/system/sysRepair';

export default {
    findPageInfo(page, limit, searchObj) {
        return request({
            url: `${BASE_URL}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },


    addRepair(sysRepair) {
        return request({
            url: `${BASE_URL}/addRepair`,
            method: 'post',
            data: sysRepair
        })
    },

    findRepairById(id) {
        return request({
            url: `${BASE_URL}/findRepairById/${id}`,
            method: 'get',

        })
    },

    updateRepair(SysRepair) {
        return request({
            url: `${BASE_URL}/updateRepair`,
            method: 'post',
            data: SysRepair
        })
    },

    removeById(id) {
        return request({
            url: `${BASE_URL}/removeRepairById/${id}`,
            method: 'delete',

        })
    },
    //  7、批量删除
    batchremoveId(ids) {
        return request({
            url: `${BASE_URL}/removeRepairByIds`,
            method: 'delete',  // 提交方式
            data: ids
        })
    },

    // 8、更改用户状态
    updateRepairStatus(id, status) {
        return request({
            url: `${BASE_URL}/updateRepairStatus/${id}/${status}`,
            method: 'get'
        })
    },
}